package com.appspot.mercadobgbr.shared;

import java.io.Serializable;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.NotPersistent;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class BoardGame implements Serializable {

	private static final long serialVersionUID = 4955715295112322935L;

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true")
	private String id;
	
	@Persistent
	private String email;
	
	@NotPersistent
	private Usuario vendedor;

	@Persistent
	private String name;

	@Persistent
	private String codigoBGG;

	@Persistent
	private String thumb;

	@Persistent
	private double valor;

	@Persistent
	private String observacao;
	
	@Persistent
	private boolean vendido;

	@NotPersistent
	private double averageWeight;

	@NotPersistent
	private int minPlayers;

	@NotPersistent
	private int maxPlayers;

	@NotPersistent
	private int playingTime;
	
	@NotPersistent
	private boolean enviado;
	
	@Persistent
	private String frete;
	
	@Persistent
	private boolean negociarValor;

	public BoardGame(String codigoBGG, String name, String thumb, int playingTime,
			double averageWeight) {
		this.setCodigoBGG(codigoBGG);
		this.name = name;
		this.thumb = thumb;
		this.playingTime = playingTime;
		this.averageWeight = averageWeight;
	}

	public BoardGame() {
	}

	public BoardGame(String codigoBGG) {
		this.codigoBGG = codigoBGG;
	}

	public int getPlayingTime() {
		return playingTime;
	}

	public void setPlayingTime(int playingTime) {
		this.playingTime = playingTime;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getThumb() {
		return thumb;
	}

	public void setThumb(String thumb) {
		this.thumb = thumb;
	}

	public double getAverageWeight() {
		return averageWeight;
	}

	public void setAverageWeight(double averageWeight) {
		this.averageWeight = averageWeight;
	}

	public String getCodigoBGG() {
		return codigoBGG;
	}

	public void setCodigoBGG(String codigoBGG) {
		this.codigoBGG = codigoBGG;
	}

	public int getMinPlayers() {
		return minPlayers;
	}

	public void setMinPlayers(int minPlayers) {
		this.minPlayers = minPlayers;
	}

	public double getValor() {
		return valor;
	}

	public void setValor(double valor) {
		this.valor = valor;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getObservacao() {
		return observacao;
	}

	public void setObservacao(String observacao) {
		this.observacao = observacao;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public boolean isVendido() {
		return vendido;
	}

	public void setVendido(boolean vendido) {
		this.vendido = vendido;
	}

	public boolean isEnviado() {
		return enviado;
	}

	public void setEnviado(boolean enviado) {
		this.enviado = enviado;
	}

	public Usuario getVendedor() {
		return vendedor;
	}

	public void setVendedor(Usuario vendedor) {
		this.vendedor = vendedor;
	}

	public String getFrete() {
		return frete;
	}

	public void setFrete(String frete) {
		this.frete = frete;
	}


	public boolean isNegociarValor() {
		return negociarValor;
	}

	public void setNegociarValor(boolean negociarValor) {
		this.negociarValor = negociarValor;
	}


}
